/**
 * 配置
 * */
package org.zmhhxl.api.auth.domain.entity.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.RequiredArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.HashSet;
import java.util.Set;

@Data
@RequiredArgsConstructor
@AllArgsConstructor
public class UserInfoDTO implements Serializable {
   private static final long serialVersionUID = -7240227419322938178L;

   private Long id;
   private String username;
   private String password;
   private boolean enabled;
   private String phoneNumber;
   private String email;
   private String avatarUrl;
   private String realName;
   private String nickName;
   private Integer gender;
   private String address;
   private String birthday;
   private String description;
   private LocalDateTime updateTime;
   private Set<Long> roleIds = new HashSet<>();
   private Set<Long> thirdPartyUserIds = new HashSet<>();

   public  UserInfoDTO(Long id, String username, String password, boolean enabled, String phone, String email, String avatarUrl,
                       String realName, String nickName, Integer gender, String address,
                       String birthday, String description, Set<Long> roleIds, Set<Long> thirdPartyUserIds) {
      this.id = id;
      this.username = username;
      this.password = password;
      this.enabled = enabled;
      this.phoneNumber = phone;
      this.email = email;
      this.avatarUrl = avatarUrl;
      this.realName = realName;
      this.nickName = nickName;
      this.gender = gender;
      this.address = address;
      this.birthday = birthday;
      this.description = description;
      this.updateTime = LocalDateTime.now();
      this.roleIds = roleIds;
      this.thirdPartyUserIds = thirdPartyUserIds;
   }
}
